﻿using System.Windows;

namespace TimeSpan.Interfaces;

public interface IDialogService {

    TObject? EditWithDialog<TObject, TWindow>()
        where TObject : class, new()
        where TWindow : Window, IEditor<TObject>, new();

    TObject? EditWithDialog<TObject, TWindow>(TObject obj)
        where TObject : class
        where TWindow : Window, IEditor<TObject>, new();

    TResult GetDialogResult<TObject, TWindow, TResult>(TObject obj)
        where TObject : class
        where TWindow : Window, IEditor<TObject>, IResult<TResult>, new();
    
    void DisplayDialog<TObject, TWindow>(TObject obj)
        where TObject : class
        where TWindow : Window, IEditor<TObject>, new();

}
